/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.psdk.local;

import com.qihoo.psdk.k;
import com.qihoo.psdk.util.h;

class d extends Thread {
    public void run()
  {
    try
    {
      int i = 1;
      while (c.a(this.a))
      {
        if (i != 0)
        {
          i = 0;
          Thread.sleep(4000 + c.d());
        }
        else
        {
          sleep(60000L);
        }
        c.a(c.e().a(c.f()));
        h.a("QLocalSession", "ts: " + com.qihoo.psdk.util.a.f() + ", bRegistered/check/init: " + c.g());
        if (c.g())
          break label196;
        c.e().a(c.f(), c.h(), c.i(), c.j());
        sleep(15000L);
        c.a(c.e().a(c.f()));
        if (!(c.g()))
          continue;
        h.a("QLocalSession", "ts: " + com.qihoo.psdk.util.a.f() + ", bRegistered/check/retry: " + c.g());
        c.c(this.a);
        k.a(c.k(), c.i());
        label196: label377: break label377:
      }
    }
    catch (Exception localException)
    {
      c.a(this.a, false);
      c.a(false);
      h.a("QLocalSession", localException);
    }
    catch (Error localError)
    {
      c.a(this.a, false);
      c.a(false);
      h.a("QLocalSession", localError);
    }
    finally
    {
      if (!(c.a(this.a)))
      {
        h.b("QLocalSession", "bBindRemote: " + c.a(this.a));
        c.b(this.a);
      }
    }
  }
}